2 using System.Collections.Generic;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Graphics;
8 namespace SuperPolarity
10 static class ParticleEffectFactory
15 static ParticleEffectFactory()
17 random = new Random();
20 public static ParticleEngine CreatePolarCircle(Vector2 location)
22 List<Texture2D> texturesList = new List<Texture2D>();
24 //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
25 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
26 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
28 ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
30 particleEngine.Color = new Color(239, 203, 204);
31 particleEngine.TTL = 10;
32 particleEngine.TTLRandomFactor = 5;
33 particleEngine.ScatterFactor = 40;
34 particleEngine.ParticleCount = 50;
35 particleEngine.StretchFactor = 2.8f;
38 return particleEngine;
41 public static ParticleEngine CreateBullet(Vector2 location)
43 List<Texture2D> texturesList = new List<Texture2D>();
45 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
46 //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
47 texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
49 ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
51 particleEngine.Color = Color.Gray;
52 particleEngine.TTL = 5;
53 particleEngine.TTLRandomFactor = 5;
54 particleEngine.ScatterFactor = 5;
55 particleEngine.ParticleCount = 10;
56 particleEngine.StretchFactor = 1;
58 return particleEngine;
61 internal static void SetGame(Game game)
63 ParticleEffectFactory.Game = game;